home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AOL File Library: 4,101 to 4,200
/
aol-file-protocol-4400-4101-to-4200.zip
/
AOLDLs
/
Shareware Demos
/
TOOTHPIK_ V3.0 Dental Office Mgr
/
TOTHDEMO.exe
/
CANONLBP.PRG
< prev
next >
Wrap
Text File
|
1993-09-17
|
6KB
|
114 lines
FUNCTION canonlbp
PARAMETERS pc_todo,px_param1,px_param2,px_param3,px_param4,px_param5,px_param6,px_param7
PRIVATE lc_params,lc_str,ll_query,ll_toprint
lc_params = "pc_todo,px_param1,px_param2,px_param3,px_param4,px_param5,px_param6,px_param7"
lc_str = ""
ll_query = .F.
ll_toprint = .T.
pc_todo = UPPER(pc_todo)
IF pc_todo="QUERY"
ll_query = .T.
ll_toprint = .F.
IF PCOUNT()=1
RETURN .T.
ENDIF
pc_todo = UPPER(px_param1)
px_param1 = px_param2
px_param2 = px_param3
px_param3 = px_param4
px_param4 = px_param5
px_param5 = px_param6
px_param6 = px_param7
ENDIF
DO CASE
CASE pc_todo = "VMI"
lc_str = CHR(27)+"[2 I"
lc_str = lc_str + ;
CHR(27)+"["+LTRIM(STR(px_param1/2))+"; G"
CASE pc_todo = "ORIENTATION"
PRIVATE la_orients,ln_x
DECLARE la_orients[3,2]
la_orients[1,1] = "PORTRAIT"
la_orients[1,2] = "0"
la_orients[2,1] = "LANDSCAPE"
la_orients[2,2] = "1"
ln_x = 1
px_param1 = UPPER(px_param1)
DO WHILE TYPE("la_orients[ln_x,1]")='C'
IF la_orients[ln_x,1] = px_param1
EXIT
ENDIF
ln_x = ln_x + 1
ENDDO
IF TYPE("la_orients[ln_x,1]") = 'C'
lc_str = CHR(27)+"["+la_orients[ln_x,2]+"p"
ENDIF
CASE pc_todo = "PFEED"
lc_str = CHR(27)+"["+;
IIF(UPPER(px_param1)="MANUAL","1","0")+"q"
CASE pc_todo = "PSIZE"
PRIVATE la_psizes,ln_x
DECLARE la_psizes[5,2]
la_psizes[1,1] = "A4"
la_psizes[1,2] = "14"
la_psizes[2,1] = "B5"
la_psizes[2,2] = "26"
la_psizes[3,1] = "LETTER"
la_psizes[3,2] = "30"
la_psizes[4,1] = "LEGAL"
la_psizes[4,2] = "32"
ln_x = 1
px_param1 = UPPER(px_param1)
DO WHILE TYPE("la_psizes[ln_x,1]")='C'
IF la_psizes[ln_x,1] = px_param1
EXIT
ENDIF
ln_x = ln_x + 1
ENDDO
IF TYPE("la_psizes[ln_x,1]") = 'C'
lc_str = CHR(27)+"["+la_psizes[ln_x,2]+"p"
ENDIF
CASE pc_todo = "TMARGIN"
PRIVATE ln_tmargin
ln_tmargin = (px_param1/2 - ((123/300) * 720))
IF ln_tmargin >= 0
lc_str = CHR(27)+"[2 I"+CHR(27)+"[11h"
lc_str = lc_str+CHR(27)+"["+;
LTRIM(STR(ln_tmargin))+"d"
lc_str = lc_str+CHR(27)+"[2t"
ENDIF
ENDCASE
IF ll_toprint
??? lc_str
ELSE
IF ll_query
px_param7 = px_param6
px_param6 = px_param5
px_param5 = px_param4
px_param4 = px_param3
px_param3 = px_param2
px_param2 = px_param1
ENDIF
ENDIF
RETURN .NOT. ISBLANK(lc_str)